<!DOCTYPE html>
<html lang="en">
    
    <head>
        <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <meta http-equiv="X-UA-Compatible" content="ie=edge">
                    <title>Document</title>
    </head>
    
    <body>
        <div id="div">
            
            <h1 v-for="msg in msgs" v-on:click="greet(msg.name)">{{msg.name}}</h1>
            
        </div>
        <script src="../js/vue.js"></script>
        <script>
            var vm = new Vue({
                el: '#div',
                data: {
                    msgs: []
                },
                methods:{
                    greet:function(e){
                        console.log(e)
                        //window.webkit.messageHandlers.openvc.postMessage(null)
                        window.webkit.messageHandlers.openvc.postMessage({name:'aa', sex:'male', age:21})
                    }
                }
            })
        </script>
    </body>
    
</html>
